home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / djgpp / src / binutils.252 / ld / ei386aou.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-17  |  2.2 KB  |  79 lines

  1. /* This file is is generated by a shell script.  DO NOT EDIT! */
  2.  
  3. /* emulate the original gld for the given i386aout
  4.    Copyright (C) 1991, 1993 Free Software Foundation, Inc.
  5.    Written by Steve Chamberlain steve@cygnus.com
  6.  
  7. This file is part of GLD, the Gnu Linker.
  8.  
  9. This program is free software; you can redistribute it and/or modify
  10. it under the terms of the GNU General Public License as published by
  11. the Free Software Foundation; either version 2 of the License, or
  12. (at your option) any later version.
  13.  
  14. This program is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. GNU General Public License for more details.
  18.  
  19. You should have received a copy of the GNU General Public License
  20. along with this program; if not, write to the Free Software
  21. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  22.  
  23. #define TARGET_IS_i386aout
  24.  
  25. #include "bfd.h"
  26. #include "sysdep.h"
  27. #include "bfdlink.h"
  28.  
  29. #include "ld.h"
  30. #include "config.h"
  31. #include "ldmain.h"
  32. #include "ldemul.h"
  33. #include "ldfile.h"
  34. #include "ldmisc.h"
  35.  
  36. static void gldi386aout_before_parse PARAMS ((void));
  37. static char *gldi386aout_get_script PARAMS ((int *isfile));
  38.  
  39. static void
  40. gldi386aout_before_parse()
  41. {
  42. #ifndef TARGET_            /* I.e., if not generic.  */
  43.   ldfile_output_architecture = bfd_arch_i386;
  44. #endif /* not TARGET_ */
  45. }
  46.  
  47. static char *
  48. gldi386aout_get_script(isfile)
  49.      int *isfile;
  50. {                 
  51.   *isfile = 1;
  52.  
  53.   if (link_info.relocateable == true && config.build_constructors == true)
  54.     return "ldscripts/i386aout.xu";
  55.   else if (link_info.relocateable == true)
  56.     return "ldscripts/i386aout.xr";
  57.   else if (!config.text_read_only)
  58.     return "ldscripts/i386aout.xbn";
  59.   else if (!config.magic_demand_paged)
  60.     return "ldscripts/i386aout.xn";
  61.   else
  62.     return "ldscripts/i386aout.x";
  63. }
  64.  
  65. struct ld_emulation_xfer_struct ld_i386aout_emulation = 
  66. {
  67.   gldi386aout_before_parse,
  68.   syslib_default,
  69.   hll_default,
  70.   after_parse_default,
  71.   after_allocation_default,
  72.   set_output_arch_default,
  73.   ldemul_default_target,
  74.   before_allocation_default,
  75.   gldi386aout_get_script,
  76.   "i386aout",
  77.   "a.out-i386"
  78. };
  79.